<?
/*
Input parameters:
    - v
    - mid
    
*/
/* TODO: Implement depends on membership plan */

foreach ($g_alert_type_map as $k => $txt)
{
	echo '<input type="Checkbox" name="f_alert_type_cb[]" ';
	html_radio_value($k, $v & $k);
	echo '>'.$txt."<br>\n";
}

$is_checked = ($v & ALERT_TYPE_FEED);

if ($is_checked) {
    $tr_style = "visibility: visible; position: relative;";
}
else {
    $tr_style = "visibility: hidden; position: absolute;";
}
?>
		
<input type="Checkbox" name="f_alert_type_feed" value="1" <? echo  $is_checked ? "checked" : ""; ?>
	id="id_alert_type_feed_<?=$mid?>" onClick="onClickAlertTypeFeed(<?=$mid?>);"
	>Generate RSS/Atom feed

<table border="0" cellspacing="0" cellpadding="0">
<tr id="id_tr_at_feeds_<?=$mid?>" style="<?=$tr_style?>"><td style="padding-left: 20;">
<p class="textStd">
<?
if (!($v & ALERT_TYPE_FEED))
{
	/* No selected feeds, so we should mark one feed as default */
	$v = ALERT_TYPE_RSS;
}
foreach ($g_alert_type_map_feeds as $k => $txt)
{
	echo '<input type="Radio" name="f_alert_type_feed_cb" ';
	html_radio_value($k, $v & $k);
	echo '>'.$txt."<br>\n";
}
?>
</td></tr>
</table>

